﻿@{
    Html.LOBHtmlHelper().SetLayout(this);
    
}

@{Html.RenderPartial("LinkPath");}

<div class="mtitle">
    @ViewBag.Title
</div>

@Html.LOBHtmlHelper().Busy("busyMain")

<table cellpadding="1" cellspacing="1" style="table-layout:fixed;" width="100%">
    <tr>
        <td style="width: 100%;height:100%" valign="top">
            @Html.LOBHtmlHelper().GridView("Language", LineOfBusiness.Core.Helper.CacheHelper.LoginUser.Language)
        </td>
    </tr> 
</table> 

<script type="text/javascript"> 

    var _codeBaseGrid = new CodeBaseGrid();
    $(document).ready(function ()
    {
        _codeBaseGrid.Init(
            "grvFunctionList",
            "Key",
            "@Url.Action("View","FunctionList")",
            "@Url.Action("Edit","FunctionList")",
            "@Url.Action("Add","FunctionList")",
            "@Url.Action("Delete","FunctionList")",
            "@Url.Action("Save","FunctionList")",
            "AD",
            "SYS_FunctionList",
            ""
            );
       
    });

    function Edit(addOnGrid) {
        _codeBaseGrid.Edit("True");
    }

    function Save() {
        _codeBaseGrid.Save();
    }

    function Undo() {
        _codeBaseGrid.Undo();
    }

   
    function CustomEnableToolBar(status) {
        document.getElementById('btnAdd').disabled = true;
        document.getElementById('btnCopy').disabled = true;
        document.getElementById('btnView').disabled = true;
        document.getElementById('btnDelete').disabled = true;
        document.getElementById('btnPrint').disabled = true;

        document.getElementById('btnAdd').className = "disabled";
        document.getElementById('btnCopy').className = "disabled";
        document.getElementById('btnView').className = "disabled";
        document.getElementById('btnDelete').className = "disabled";
        document.getElementById('btnPrint').className = "disabled";
    }
</script>
